﻿Public Class ThuVien
    Public Sub HThiFormCon(ByVal frCha As Form, ByVal fr As Form)
        Dim frm As Form
        For Each frm In frCha.MdiChildren
            If frm.Text.ToUpper = fr.Text.ToUpper Then
                frm.Activate()
                Exit Sub
            End If
        Next
        fr.MdiParent = frCha
        fr.StartPosition = FormStartPosition.CenterScreen
        fr.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedDialog
        fr.MinimizeBox = False
        fr.MaximizeBox = False
        fr.Show()
    End Sub
   
    Public Sub chiChoNhapSo(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If Not (Char.IsControl(e.KeyChar) Or Char.IsDigit(e.KeyChar)) Then
            e.Handled = True
        End If
    End Sub

End Class
